
    /**  
    * @Title: JuheCode.java
    * @Package com.third.juhe.api
    * @Description: 
    * @author likai
    * @date 2017年11月1日
    * @version V1.0  
    */
    
package com.third.utils.juheapi;


/**
    * @ClassName: JuheCode
    * @Description: 集合数据手机充值返回码参考
    * @author likai
    * @date 2017年11月1日
    *
    */

public enum JuheCode {

	e208501(208501,"不允许充值的手机号码及金额"),e208502(208502,"请求手机号和面值查询商品信息失败，请重试"),e208503(208503,"运营商地区维护，暂不能充值"),
	e208504(208504,"请求手机号和面值查询商品信息错误"),e208505(208505,"错误的手机号码"),e208506(208506,"错误的充值金额"),
	e208507(208507,"充值失败"),e208508(208508,"请求充值失败，请重试"),e208509(208508,"错误的订单号"),
	e208510(208510,"请求订单状态失败，请重试"),e208513(208513,"查询订单失败"),e208514(208514,"不合规范的订单号（8-32位）"),
	e208515(208515,"校验值sign错误"),e208516(208516,"重复的订单号"),e208517(208517,"当前账户可用余额不足"),
	
	e10001(10001,"错误的请求KEY"),e10002(10002,"	该KEY无请求权限"),e10003(10003,"KEY过期"),
	e10004(10004,"错误的OPENID"),e10005(10005,"应用未审核超时，请提交认证"),
	e10007(10007,"未知的请求源"),e10008(10008,"被禁止的IP"),e10009(10009,"被禁止的KEY"),
	e10011(10011,"当前IP请求超过限制"),e10012(10012,"请求超过次数限制"),e10013(10013,"测试KEY超过请求限制"),
	e10014(10014,"系统内部异常"),e10020(10020,"接口维护"),e10021(10021,"接口停用");
	
	
	private int code;
	private String msg;
	public int getCode() {
		return code;
	}
	public String getMsg() {
		return msg;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	private JuheCode(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	
	public static JuheCode getJuheCode(int code) {
		for (JuheCode juheCode : JuheCode.values()) {
			if (juheCode.getCode()==code) {
				return juheCode;
			}
		}
		return null;
	}
	
}
